<script type="text/javascript">
$(function() {
   if(typeof($.gallery) === "undefined")
       $("body").append('<script type="text/javascript" src="__PUBLIC__/javascripts/bhxp/gallery.js" ><\/script>');
   $.gallery({swapId:"Q91Z3R9V4D464L3I079Y4O9A924"}).reload().setIsAuto(true).start(2000);
});

function getUlr(id){
  if(id == 1){
    window.location.href="{:U('Shose/index')}";
  }else if(id == 2){
    window.location.href="{:U('Shose/recommend')}";
  }else if(id == 3){
    window.location.href="{:U('Shose/category')}";
  }
}

function check_form(){
  var com_1=document.getElementById("com_1").value;
  var com_2=document.getElementById("com_2").value;
  if(com_1 == "" || com_1 == "昵称"){
    $("#story_msg_1").fadeIn("slow");
    return false;
  }
  if(com_2 == "" || com_2 == "评论"){
    $("#story_msg_1").fadeIn("slow");
    return false;
  }

  var data = { 'nickname': com_1, 'content': com_2, 'shose_id': '{$Think.get.shose_id}' };

  $.post('{:U('Shose/doComment')}', data, function(data, status) {
    alert(data.info);
    if (true == data.status) {
      return window.location.reload();
    }

    return false;
  });

  return false;
}



</script>
